Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle out of bounds WGS84 coordinates #10

Merged
merged 6 commits into from
Mar 29, 2024
Merged

Handle out of bounds WGS84 coordinates #10

merged 6 commits into from
Mar 29, 2024

Conversation

rgwozdz
Copy link
Member

@rgwozdz rgwozdz commented Mar 29, 2024

Geoservice API geometry filters in the WGS84 coordinate system may contain coordinates that lie outside the bounds of the WGS84 extent (e.g., -185, -95). Out of bounds coordinates, particularly latitudes are non-sensical, but certain clients have been known to produce them. This PR constrains any out-of-bounds coordinates to their known limits (e.g., -95 latitude -> -90 latitude).

In addition, the proj4 dependency appears to have a problem with reprojecting WGS84 latitudes -90 and 90 - as of this writing is throws an error. The PR makes a change so that latitudes of -90 or 90 are modified to -89.99999 and -89.99999, respectively. This allow reprojection to proceed as expected.

@rgwozdz rgwozdz self-assigned this Mar 29, 2024
@rgwozdz rgwozdz merged commit 264940d into main Mar 29, 2024
2 checks passed
@rgwozdz rgwozdz deleted the f/handle-oob-coords branch March 29, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant